﻿#region 版权信息
// ------------------------------------------------------------------------------
// Copyright: (c) 2029  成都A+有限公司 - Amm
// 项目名称：Amm.Common
// 文件名称：PageResponseWrapper.cs
// 创建时间：2020101022:33
// 更改时间：2020101022:33
//  ------------------------------------------------------------------------------
#endregion

namespace Colorful.Furniture.Wrappers
{
    /// <summary>
    ///  分页包裹体
    /// <remarks>普通分页包裹体</remarks>
    /// </summary>
    /// <typeparam name="TDataItem">分页列表数据项</typeparam>
    public class PageResponseWrapper<TDataItem> where TDataItem : class, new()
    {
        /// <summary>
        ///  数据项
        /// </summary>
        public TDataItem Items { get; set; }

        /// <summary>
        ///  页面总条数
        /// </summary>
        public long Total { get; set; }
    }

    /// <summary>
    ///  分页包裹体
    /// </summary>
    /// <typeparam name="TDataItem">分页列表数据项</typeparam>
    /// <typeparam name="TSumItem">求和数据项</typeparam>
    public class PageResponseWrapper<TDataItem, TSumItem> : PageResponseWrapper<TDataItem> where TDataItem : class, new()
    {
        /// <summary>
        ///  合计项
        /// </summary>
        public TSumItem SumItems { get; set; }
    }
}